home *** CD-ROM | disk | FTP | other *** search
- %case uses%
- %case instance%
- %if classname = CArrayPane%
- %itemname%:% %CAMArrayPane;
- %else%
- %itemname%:% %%classname%;
- %endif%
- %case create%
-
- %if classname = CArrayPane%
- %itemname% := New%itemname%;
- %else%
- New (%itemname%);
- %endif%
- %itemname%.IViewRes ('%paneType%', %paneID%, %enclosure%, supervisor);
- %if defined itsPanorama%
- %set itsPanorama = itemname%
- %endif%
- %case zAuxiliaryMethod.decl%
- %if classname = CArrayPane%
- Function New%itemname%: CAMArrayPane;
- %endif%
- %case zAuxiliaryMethod%
- %if classname = CArrayPane%
- {----------}
- { The only purpose of this function is so that you can override it}
- { to create the list as your subclass of CAMArrayPane}
-
- %if window%
- Function Z%windname%.New%itemname%: CAMArrayPane;
- %else%
- Function Z%dlogname%.New%itemname%: CAMArrayPane;
- %endif%
- var
- pane: CAMArrayPane;
- Begin
- New (pane);
- New%itemname% := pane;
- End; {New%itemname%}
-
- %endif%
- %case auxiliaryClass%
- %if classname = CArrayPane%
- type
- C%itemname%% %= object (CAMArrayPane)
- Procedure IViewTemp (anEnclosure: CView;
- aSupervisor: CBureaucrat;
- viewData: Ptr); override;
- Procedure GetCellText (aCell: Cell;
- availableWidth: integer;
- var itsText: Str255); override;
- end; {C%itemname%}
-
- %endif%
- %case auxiliaryMethod.decl%
- %if classname = CArrayPane%
- Function New%itemname%: CAMArrayPane; override;
- %endif%
- %case auxiliaryMethod%
- %if classname = CArrayPane%
- {----------}
- Procedure C%itemname%.IViewTemp% %(anEnclosure: CView;
- aSupervisor: CBureaucrat;
- viewData: Ptr);
- Begin
- inherited IViewTemp (anEnclosure, aSupervisor, viewData);
-
- {any additional initialization for your subclass}
- AddRow (4, 0); {e.g., add 4 rows at the beginning of the list}
-
- End; {IViewTemp}
-
- {----------}
- Procedure C%itemname%.GetCellText% %(aCell: Cell;
- availableWidth: integer;
- var itsText: Str255);
- Begin
- {replace with your own code which uses the cell coordinates}
- {to access your private data structures,}
- {then convert the cell data to a Str255}
-
- case aCell.v of
- 0:
- itsText := 'One';
- 1:
- itsText := 'Two';
- 2:
- itsText := 'Three';
- otherwise
- itsText := 'Infinity';
- end; {case}
-
- End; {GetCellText}
-
- {----------}
- { This overrides the parent's New%itemname% to create a subclass of CAMArrayPane}
-
- %if window%
- Function C%windname%.New%itemname%: CAMArrayPane;
- %else%
- Function C%dlogname%.New%itemname%: CAMArrayPane;
- %endif%
- var
- pane: C%itemname%;
- Begin
- New (pane);
- New%itemname% := pane;
- End; {New%itemname%}
-
- %endif%
- %case ProviderChanged%
- if aProvider = %itemname% then begin
- if %itemname%.HasSelection then begin
- {perhaps activate some buttons}
- end else begin
- {perhaps deactivate}
- end
- end;
-